import storage from './storage.js'

const cache = {
	setUrls(imgsData){
		storage.setItem('imgsData',imgsData)
	},
	getUrls(){
		return storage.getItem('imgsData')
	},
	clearUrls(){
		storage.removeItem('imgsData')
	},
	clearAllCache() {
		const toRemoveKeys = ['tabItems', 'activeTab'];
		toRemoveKeys.forEach(key => {
			storage.removeItem(key);
		})
	}
};

export default cache;
